交叉编译SPECCPU2006 | 您所在的位置:网站首页 › lehaut heron › 交叉编译SPECCPU2006 |
为了在模拟器(gem5等)上、arm开发板上运行SPECCPU2006,需要交叉编译之,本文提供交叉编译SPECCPU2006的步骤。 1、下载SPECCPU2006.iso(http://www.spec.org/) 2、因为下载的是iso格式,需要mount到linux的某个目录下再进行操作。 # mount iso9660 path-to-SPECXX.iso /mnt/iso -o loop 3、安装speccpu # cd /mnt/iso/ # ./install.sh -d /opt/speccpu (-d是指定安装路径) 4、安装完后,需要到安装的目录执行命令: # cd /opt/speccpu #source cshrc 5、修改编译speccpu的配置文件。由于是交叉编译,所以需要指定编译工具,(假定你已经成功安装了arm的交叉编译工具链) # cd /opt/speccpu/config # cp Example-medium.cfg arm.cfg (以一个配置文件为基础进行修改) 打开arm.cfg,分别找到CC,CXX,FC 改成如下格式: CC = your-cross-compiler-gcc CXX = your-cross-compiler-g++ FC = your-cross-compiler-gfortran 修改完后保存退出,其他地方不用改。 6、编译speccpu: runspec --action=build --config=arm.cfg --tune=base int (只编译int型benchmark,不运行) 7、将编译好的文件(在源码目录下,如benchspec/CPU2006/400.perlbench/build/)拷贝出来就可以在目标板或者模拟器上运行了。
参考网址: 1、gem5 cross compile speccpu: http://daystrom.m5sim.org/SPEC_CPU2006_benchmarks 2、install gem on linux: http://www.spec.org/cpu2006/Docs/install-guide-unix.html#s7 3、the 'runspec' command :http://www.spec.org/cpu2006/docs/runspec.html 4、speccpu2006 config file: http://www.spec.org/cpu2006/docs/config.html
|
CopyRight 2018-2019 实验室设备网 版权所有 |